/*
 * Copyright (C) 2015 - present Instructure, Inc.
 *
 * This file is part of Canvas.
 *
 * Canvas is free software: you can redistribute it and/or modify it under
 * the terms of the GNU Affero General Public License as published by the Free
 * Software Foundation, version 3 of the License.
 *
 * Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
 * A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
 * details.
 *
 * You should have received a copy of the GNU Affero General Public License along
 * with this program. If not, see <http://www.gnu.org/licenses/>.
 */

$turnitin_blue: #397af4;
@if $use_high_contrast { $turnitin_blue: #0d5bed; }

$turnitin_green: #009917;
@if $use_high_contrast { $turnitin_green: #007010; }

$turnitin_yellow: #897b01;
@if $use_high_contrast { $turnitin_yellow: #746801; }

$turnitin_orange: #c86604;
@if $use_high_contrast { $turnitin_orange: #9b5003; }

$turnitin_red: #ad393a;
@if $use_high_contrast { $turnitin_red: #a03536; }

$turnitin_gray: #808080;
@if $use_high_contrast { $turnitin_gray: #666666; }

.turnitin_score_container_caret {
  position: absolute;
  width: 0;
  height: 0;
  top: 50%;
  content: "";
  border-width: 4px;
  border-color: transparent;
  border-style: solid;
  left: -8px;
  margin-top: -4px;
  &.none_score {
    border-right-color: $turnitin_blue;
  }
  &.acceptable_score {
    border-right-color: $turnitin_green;
  }
  &.warning_score {
    border-right-color: $turnitin_yellow;
  }
  &.problem_score {
    border-right-color: $turnitin_orange;
  }
  &.failure_score {
    border-right-color: $turnitin_red;
  }
  &.submission_error, &.submission_pending {
    border-right-color: $turnitin_gray;
  }
}

.turnitin_score_container {
  position: relative;
  margin-left: 10px;
}

.turnitin_similarity_score,
.turnitin_similarity_score:link,
.turnitin_similarity_score:visited,
.turnitin_similarity_score:active,
.turnitin_similarity_score:hover,
.turnitin_similarity_score:focus {
  display: inline-block;
  white-space: nowrap;
  border-radius: 3px;
  padding: 2px 4px;
  font-weight: bold;
  color: $ic-color-light;
  @include fontSize(12px);
  text-decoration: none;
  &.none_score {
    background-color: $turnitin_blue;
  }
  &.acceptable_score {
    background-color: $turnitin_green;
  }
  &.warning_score {
    background-color: $turnitin_yellow;
  }
  &.problem_score {
    background-color: $turnitin_orange;
  }
  &.failure_score {
    background-color: $turnitin_red;
  }
  &.submission_error, &.submission_pending {
    background-color: $turnitin_gray;
  }
}

.turnitin_score_container {
  position: relative;
  margin-left: 10px;
}

.turnitin_resubmit_container {
  text-align: right;
}

.turnitin-comments {
  font-size: 0.8em;
}
